package com.qijian.maindata.domain.query;

import com.baomidou.mybatisplus.annotation.TableName;
import com.qijian.common.utils.mybatis.WhereType;
import com.qijian.common.utils.mybatis.WhereTypeEnum;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.List;
import java.util.Set;


/**
 * 工装台账对象 查询条件类
 *
 * @author qijian
 * @date 2024-01-19
 */

@Data
@ToString
@TableName("main_frock_ledger")
public class FrockLedgerQuery {

    @WhereType(filed = "id")
    private Long id;

    @WhereType(filed = "id", type = WhereTypeEnum.IN)
    private Set<Long> ids;

    @WhereType(filed = "year", type = WhereTypeEnum.LIKE)
    private String year;
    @WhereType(filed = "project_no", type = WhereTypeEnum.LIKE)
    private String projectNo;
    @WhereType(filed = "name", type = WhereTypeEnum.LIKE)
    private String name;
    @WhereType(filed = "weight")
    private BigDecimal weight;
    @WhereType(filed = "quantity")
    private String quantity;

    @WhereType(filed = "type", type = WhereTypeEnum.LIKE)
    private String type;
    @WhereType(filed = "dept_name", type = WhereTypeEnum.LIKE)
    private String deptName;
    @WhereType(filed = "location", type = WhereTypeEnum.LIKE)
    private String location;

    @WhereType(filed = "remark", type = WhereTypeEnum.LIKE)
    private String remark;

    @WhereType(func = "(FIND_IN_SET({1},sys_classify.ancestors) or sys_classify.id = {1})")
    private Long itemClassifyId;
    @WhereType(filed = "factory_area", type = WhereTypeEnum.LIKE)
    private String factoryArea;

    @WhereType(filed = "location_parent", tableName = "main_ledger_area_detail")
    private String locationParent;

    @WhereType(filed = "area", tableName = "main_ledger_area_detail")
    private String area;

    @WhereType(filed = "dept_id", type = WhereTypeEnum.IN)
    private List<String> deptIds;


}
